<!doctype html>
<html lang="zh-CH">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    {{--<meta name="viewport" content="width=device-width, initial-scale=1">--}}
    <title>央票通</title>
    <link rel="stylesheet" href="./resource/css/index.css">
    <link rel="stylesheet" href="./resource/css/user.css">
</head>
<body  onLoad="Ckeckeds()">
<!-- 头部 -->
@include('common.index_head')
<?php   $user  = UserService::instance()->GetUserInformation();?>
<!-- 个人中心 -->
<div class="cont-user">
    <!-- 个人中心头部 -->
    @include('common.user_head')
    <div class="user-center">
        <div class="main">
            <!-- 个人中心列表 -->
            @include('common.user_left')
            <div class="user-container left">
                <div class="user-title user-password user-mon">
                    <div class="title">
                        <div class="h left">充值提现</div>
                    </div>
                    <div class="mon-ul">
                        <ul>
                            <li><a href="/user_money">充值</a></li>
                            <li class="active"><a href="/user_money_">提现</a></li>
                        </ul>
                    </div>
                    <div class="mon-box">
                        <div class="user-box">
                           <!--<form action="/user_money_pay" method="post" >-->
                            <div class="mon-withdraw">
                                   <?php  if(!empty($infoyeno)){?>
                                <div class="mon-num">可提现金额：<span><?php  if(!empty($UserExtendone->user_balance)){ echo $UserExtendone->user_balance;}else{ echo "0.00";}?></span> 元</div>
                                <div class="mon-with">提现金额（元）
                                    <input type="text" id="moneysum" class="form-control" name="moneysum">
                                    <span>( 预计1-2个工作日到账 )</span>
                                </div>
                               
                                    <!-- 绑定之后 -->
                                    <div class="with-bank">提现至该银行卡</div>
                                    <div class="user-bor user-cade">
                                      
                                         <?php  if(!empty($info)){?>
                                        <div class="bank-title">
                                            <img src="./resource/img/user_bank.png" alt="">
                                        </div>
                                        <div class="user-mess">

                                            <div class="left cade" >{{substr_replace($info->bank_num,'********',4,11)}}</div>
                                            <div class="span left clear" id="bound_name">{{$info->bound_name}}</div>
                                            <div class="left"><span id="times">{{date('Y-m-d',$info->created)}}</span></div>
                                        </div>
                                    </div>
                                    <?php  }?> 
                                    <input type="hidden"  name='bound_name' value="<?php  if(!empty($info->bound_name)){echo $info->bound_name;}?>">
                                <input type="hidden" id="bank_num"  name='bank_num' value="<?php if(!empty($info->bank_num)){echo $info->bank_num;} ?>">
                                <input type="hidden" id="UserExtendone"  name='UserExtendone' value="<?php  if(!empty($UserExtendone)){ echo $UserExtendone->user_balance;}?>">
                               <input type="hidden"  id="status" name='status' value="<?php  if(!empty($info->status)){echo $info->status;}?>">
                               <input type="hidden"  id="bank_id" name='bank_id' value="<?php  if(!empty($info->bank_id)){echo $info->bank_id;}?>">
                                <input type="submit" name="Submit" class="btn btn-default" value=" 确认提现 " onclick="getpostal()">
                                <?php  }else{?>
                                <!-- 绑定之前 -->
                                <div class="with-bank">请先绑定银行卡</div>
                               <div class="user-bor user-add">
                                   <input type="hidden" value="{{$user->id_card}}" id="card">
                                   <div class="btn-b">
                                       <a href="javascript:void(0)" onclick="Certificate()"></a>
                                   </div>
                                   <span>添加银行卡</span>
                               </div>
                                <?php  }?>
                                
                            </div>
                            <!--</form>-->
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<!-- footer -->
@include('common.index_foot')
<script src="./resource/js/jquery-1.11.3.min.js"></script>
<script src="./resource/js/index.js"></script>
<script src="./resource/js/user.js"></script>
<script src="./resource/jquery/UserMoney_.js"></script>
<script>
    function  Ckeckeds(){
        var  status           =$("#status").val();
        var  bank_id           =$("#bank_id").val();
        if(status=='1'){
            alert("请完善银行卡信息");
            window.location.href='/user_bankcard_up?bank_id='+bank_id;
            return false;
        }



    }

</script>
</body>
</html>
